1. Field of the Invention
The present invention relates generally to data processing, and more particularly to a computer implemented method, apparatus, and computer usable program code for moving dependencies along with source code.
2. Description of the Related Art:
An integrated development environment (IDE) is a set of software tools such as source editors, compilers, and debuggers that are commonly accessible from a single user interface. Many integrated development environments help developers manage the source code of applications using an artifact called a project. Common integrated development environments include Eclipse, JBuilder® and Visual Studio®.
A project defines a compilation unit in which source-code files are stored and may be compiled to produce an executable program. Typically, source files are not self contained because the source files use code elements, such as types, operators, or both that are declared in an external software component, such as a file, project, or library. In each case, a project also includes a reference to the location of the external components to allow the compiler to work properly. The relationship between a project that refers to an external component and the external component itself is called a dependency.
Integrated development environments like Eclipse allow a developer to work with several projects at the same time, providing the developer the ability to move and/or copy files from one project to another. The project from which the files are moved is called the origin project. The project to which the files are moved is called the destination project. Move and copy operations may be performed via the user interface. For example, the developer may use “drag and drop” or “cut, copy, and paste” operations as needed. In some instances, the developer may implement the operations using an application programming interface (API). An application programming interface is an interface that allows an application program that is written in a high-level language to use specific data or functions of the operating system or another program.
Current development environments have an important limitation. They do not take into account the dependencies created by the moved/copied files. Consequently, if a file requires an external reference to be added to the project for it to compile, then the developer will also have to move/copy the external reference to the destination project. Otherwise, the project will not compile. As a result, when a developer uses a current integrated development environment, the developer must manually determine which libraries or projects the moved/copied files depend on and manually recreate these dependencies in the destination project. Manually moving dependencies is time consuming but necessary using current development environments.